package edu.gdkm.paydemo;

import java.io.IOException;

public class StudentTest {
    public static void main(String[] args) {
        Student student = new Student();
        student.studentId="100001";
        student.name="李四";
        student.cScore = 88;
        student.computerScore =89;
        student.englishScore=87;
        System.out.println(student.avg());
        Student stu1 = new Student("100002","张三",88,89,87);
        System.out.println("stu1:"+stu1);
        Student stu2 = new Student("100003","王五");
        System.out.println("stu2:"+stu2);
        Student stu3 = new Student();
        System.out.println("stu3:"+stu3);




        try {
            CsvReader csvReader = new CsvReader("data/scores.csv", ','); // 指定CSV文件路径和分隔符
            Student[] students = csvReader.readCsv(); // 读取CSV文件并解析数据到列表中
            for (int i = 0; i < students.length; i++) {
                System.out.println(students[i]);
            }
        } catch (IOException e) {
            e.printStackTrace(); // 处理文件读取异常，例如文件不存在或读取错误等
        }
    }
}
